<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Collision Checker: cpp/collision/src/narrowphase/shape.cc Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Collision Checker
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_df511e5bd85cec96854b39d5e1c27aa8.html">cpp</a></li><li class="navelem"><a class="el" href="dir_bf0f0c8865c1942e08ab5157e2c596db.html">collision</a></li><li class="navelem"><a class="el" href="dir_0bc2acc18702bc40f3a0aa3bc19285f7.html">src</a></li><li class="navelem"><a class="el" href="dir_e6a098a69b4576d04ca32995358016e2.html">narrowphase</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">shape.cc</div>  </div>
</div><!--header-->
<div class="contents">
<a href="shape_8cc.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="shape_8h.html">collision/narrowphase/shape.h</a>&quot;</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecollision.html">collision</a> {</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape.html#a1efc0d3437abbac61d5c444b9d1becf5">    5</a></span>&#160;<a class="code" href="classcollision_1_1_shape.html#a1efc0d3437abbac61d5c444b9d1becf5">Shape::~Shape</a>() {}</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape.html#ac8e7fe1b16ef1ee803d511b593ae2936">    7</a></span>&#160;<a class="code" href="classcollision_1_1_shape.html#ac8e7fe1b16ef1ee803d511b593ae2936">Shape::Shape</a>(<span class="keyword">const</span> <a class="code" href="classcollision_1_1_shape.html">Shape</a> &amp;copy) : center_(copy.center()) {}</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">// void Shape::print(std::ostringstream &amp;stream) const {}</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a></div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape.html#a2bec0ccd43f30004758b2112b46659d4">   12</a></span>&#160;<a class="code" href="classcollision_1_1_shape.html#a2bec0ccd43f30004758b2112b46659d4">Shape::timeSlice</a>(<span class="keywordtype">int</span> time_idx, <a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> shared_ptr_this)<span class="keyword"> const </span>{</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;  <span class="keywordflow">return</span> shared_ptr_this;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;}</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape.html#aca9a2f6e0de0822e241e39dad9c419ce">   16</a></span>&#160;Eigen::Vector2d <a class="code" href="classcollision_1_1_shape.html#aca9a2f6e0de0822e241e39dad9c419ce">Shape::center</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classcollision_1_1_shape.html#a3a397b619573e160d18954605a11f7bd">center_</a>; }</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape.html#a690571543f14979499df6fbada671f1f">   18</a></span>&#160;<span class="keywordtype">double</span> <a class="code" href="classcollision_1_1_shape.html#a690571543f14979499df6fbada671f1f">Shape::center_x</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classcollision_1_1_shape.html#a3a397b619573e160d18954605a11f7bd">center_</a>(0); }</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape.html#aabac3270d60bb5affed693af36fd39d8">   20</a></span>&#160;<span class="keywordtype">double</span> <a class="code" href="classcollision_1_1_shape.html#aabac3270d60bb5affed693af36fd39d8">Shape::center_y</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classcollision_1_1_shape.html#a3a397b619573e160d18954605a11f7bd">center_</a>(1); }</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape.html#a55dc047a30f0c61947d0bb46df3af8dd">   22</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classcollision_1_1_shape.html#a55dc047a30f0c61947d0bb46df3af8dd">Shape::set_center</a>(<span class="keyword">const</span> Eigen::Vector2d &amp;_center) {</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;  <a class="code" href="classcollision_1_1_shape.html#a3a397b619573e160d18954605a11f7bd">center_</a> = _center;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;  <a class="code" href="classcollision_1_1_collision_object_ex.html#ab080033cf96284d10d0a7950bf2fd595">invalidateCollisionEntityCache</a>();</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;}</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classcollision_1_1_shape.html#ad2b8994c5daeaab71cb04a73a6de8b0f">   27</a></span>&#160;<span class="keywordtype">double</span> <a class="code" href="classcollision_1_1_shape.html#ad2b8994c5daeaab71cb04a73a6de8b0f">Shape::radius</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classcollision_1_1_shape.html#ab453849fed42ee9769df87210ca5262d">radius_</a>; }</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;} <span class="comment">// namespace collision</span></div><div class="ttc" id="classcollision_1_1_shape_html_a55dc047a30f0c61947d0bb46df3af8dd"><div class="ttname"><a href="classcollision_1_1_shape.html#a55dc047a30f0c61947d0bb46df3af8dd">collision::Shape::set_center</a></div><div class="ttdeci">void set_center(const Eigen::Vector2d &amp;_center)</div><div class="ttdoc">Set geometric center of shape.</div><div class="ttdef"><b>Definition:</b> <a href="shape_8cc_source.html#l00022">shape.cc:22</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html_ab453849fed42ee9769df87210ca5262d"><div class="ttname"><a href="classcollision_1_1_shape.html#ab453849fed42ee9769df87210ca5262d">collision::Shape::radius_</a></div><div class="ttdeci">double radius_</div><div class="ttdef"><b>Definition:</b> <a href="shape_8h_source.html#l00072">shape.h:72</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_object_ex_html_ab080033cf96284d10d0a7950bf2fd595"><div class="ttname"><a href="classcollision_1_1_collision_object_ex.html#ab080033cf96284d10d0a7950bf2fd595">collision::CollisionObjectEx::invalidateCollisionEntityCache</a></div><div class="ttdeci">void invalidateCollisionEntityCache(void)</div><div class="ttdef"><b>Definition:</b> <a href="collision__object__ex_8cc_source.html#l00043">collision_object_ex.cc:43</a></div></div>
<div class="ttc" id="namespacecollision_html_a405f2c04407997fea529aad88f04ad30"><div class="ttname"><a href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">collision::CollisionObjectConstPtr</a></div><div class="ttdeci">std::shared_ptr&lt; const CollisionObject &gt; CollisionObjectConstPtr</div><div class="ttdef"><b>Definition:</b> <a href="collision__object_8h_source.html#l00041">collision_object.h:41</a></div></div>
<div class="ttc" id="namespacecollision_html"><div class="ttname"><a href="namespacecollision.html">collision</a></div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8h_source.html#l00020">collision_checker.h:20</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html_a2bec0ccd43f30004758b2112b46659d4"><div class="ttname"><a href="classcollision_1_1_shape.html#a2bec0ccd43f30004758b2112b46659d4">collision::Shape::timeSlice</a></div><div class="ttdeci">virtual CollisionObjectConstPtr timeSlice(int time_idx, CollisionObjectConstPtr shared_ptr_this) const</div><div class="ttdef"><b>Definition:</b> <a href="shape_8cc_source.html#l00012">shape.cc:12</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html_a1efc0d3437abbac61d5c444b9d1becf5"><div class="ttname"><a href="classcollision_1_1_shape.html#a1efc0d3437abbac61d5c444b9d1becf5">collision::Shape::~Shape</a></div><div class="ttdeci">virtual ~Shape()</div><div class="ttdef"><b>Definition:</b> <a href="shape_8cc_source.html#l00005">shape.cc:5</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html_ac8e7fe1b16ef1ee803d511b593ae2936"><div class="ttname"><a href="classcollision_1_1_shape.html#ac8e7fe1b16ef1ee803d511b593ae2936">collision::Shape::Shape</a></div><div class="ttdeci">Shape(const Shape &amp;copy)</div><div class="ttdef"><b>Definition:</b> <a href="shape_8cc_source.html#l00007">shape.cc:7</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html_ad2b8994c5daeaab71cb04a73a6de8b0f"><div class="ttname"><a href="classcollision_1_1_shape.html#ad2b8994c5daeaab71cb04a73a6de8b0f">collision::Shape::radius</a></div><div class="ttdeci">double radius() const</div><div class="ttdoc">Get radius.</div><div class="ttdef"><b>Definition:</b> <a href="shape_8cc_source.html#l00027">shape.cc:27</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html"><div class="ttname"><a href="classcollision_1_1_shape.html">collision::Shape</a></div><div class="ttdoc">Base prototype for the shape of an obstacle.</div><div class="ttdef"><b>Definition:</b> <a href="shape_8h_source.html#l00024">shape.h:24</a></div></div>
<div class="ttc" id="shape_8h_html"><div class="ttname"><a href="shape_8h.html">shape.h</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html_a690571543f14979499df6fbada671f1f"><div class="ttname"><a href="classcollision_1_1_shape.html#a690571543f14979499df6fbada671f1f">collision::Shape::center_x</a></div><div class="ttdeci">double center_x() const</div><div class="ttdef"><b>Definition:</b> <a href="shape_8cc_source.html#l00018">shape.cc:18</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html_aabac3270d60bb5affed693af36fd39d8"><div class="ttname"><a href="classcollision_1_1_shape.html#aabac3270d60bb5affed693af36fd39d8">collision::Shape::center_y</a></div><div class="ttdeci">double center_y() const</div><div class="ttdef"><b>Definition:</b> <a href="shape_8cc_source.html#l00020">shape.cc:20</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html_a3a397b619573e160d18954605a11f7bd"><div class="ttname"><a href="classcollision_1_1_shape.html#a3a397b619573e160d18954605a11f7bd">collision::Shape::center_</a></div><div class="ttdeci">Eigen::Vector2d center_</div><div class="ttdef"><b>Definition:</b> <a href="shape_8h_source.html#l00071">shape.h:71</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html_aca9a2f6e0de0822e241e39dad9c419ce"><div class="ttname"><a href="classcollision_1_1_shape.html#aca9a2f6e0de0822e241e39dad9c419ce">collision::Shape::center</a></div><div class="ttdeci">Eigen::Vector2d center() const</div><div class="ttdoc">Get geometric center of shape.</div><div class="ttdef"><b>Definition:</b> <a href="shape_8cc_source.html#l00016">shape.cc:16</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
